<!--
string GetState(void):
Gets state of any offline updates. The returned values can be:
- "none" - no offline update is scheduled
- "scheduled" - an offline update is scheduled
+ "none" - no offline update is prepared nor scheduled
+ "prepared" - an offline update is prepared and can be scheduled by SetAction() method
+ "scheduled" - an offline update is scheduled for the next reboot
-->
<method name="GetState">
<arg type="s" name="state" direction="out" />
try {
const state = await this._getUpdateState();
+ this._updatePrepared = state === 'prepared';
this._updateScheduled = state === 'scheduled';
} catch (e) {
if (this._softwareOfflineUpdatesProxy !== null)
log(`Failed to get update info from gnome-software: ${e.message}`);
+ this._updatePrepared = false;
this._updateScheduled = false;
}
this._loadSessions().catch(logError);
_setCheckBoxLabel(this._checkBox, dialogContent.checkBoxText || '');
- this._checkBox.visible = dialogContent.checkBoxText && this._updateScheduled;
+ this._checkBox.visible = dialogContent.checkBoxText && this._updatePrepared;
this._checkBox.checked = this._checkBox.visible && !this._isBatteryLow();